package Imp.clients.fallback;

import Imp.clients.openFeignlntImp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class ItemServiceFallback implements FallbackFactory<openFeignlntImp> {
    @Override
    public openFeignlntImp create(Throwable cause) {

        return new openFeignlntImp() {
            @Override
            public String getItemSum() {
                log.info("查询失败", cause);
                return "等待处理过多，查询失败，请稍后重试";
            }


        };
    }
}
